<div class="row">
    <!-- left column -->
    <div class="col-md-12">
        <!-- general form elements -->
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">新增分类</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form class="form-horizontal" role="form" method="post" action="/categorys/add/category" enctype="multipart/form-data">
                <div class="box-body">
                    <div class="form-group">
                        <label for="Name" class="col-sm-2 control-label">分类名称</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="Name" placeholder="分类名称" value="" name="Name" required="required" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="ParentId" class="col-sm-2 control-label">上级分类</label>
                        <div class="col-sm-10">
                            <select class="form-control" name="ParentId" id="ParentId" required="required" >
                                <option value="0">顶级分类</option>
                                {{range $i, $v := .list}}
                                    <option value="{{$v.ID}}">{{$v.Name}}</option>
                                {{end}}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="Sort" class="col-sm-2 control-label">排序</label>

                        <div class="col-sm-10">
                            <input type="number" class="form-control" id="Sort" placeholder="排序" name="Sort"  required="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputHeadIco" class="col-sm-2 control-label">&nbsp;</label>
                    </div>
                </div>
                <!-- /.box-body -->

                <div class="box-footer">
                    <button type="submit" class="btn btn-primary">提交</button>
                </div>
            </form>
        </div>
        <!-- /.box -->


    </div>
</div>